package airplane.com.example.mapper;

import airplane.com.example.entry.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    List<User> queryUserList(User user);
    User queryUserByName(User user);
    int insertUser(User user);
    int deleteUser(User user);

    // 分页查询
    List<User> findByPage(@Param("start") Integer currentPage, @Param("end") Integer pageSize);

    // 查询总页数
    int findTotal();
}
